Read ahead of digests in similarity based data deduplicaton

ABSTRACT

For read ahead of digests in similarity based data deduplication in a data deduplication system using a processor device in a computing environment, input data is partitioned into data chunks and digest values are calculated for each of the data chunks. The positions and sizes of similar data intervals in a repository of data are found for each of the data chunks. The positions and the sizes of read ahead intervals are calculated based on the similar data intervals. The read ahead digests of the read ahead intervals are located and loaded into memory in a background read ahead process.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application, listed as docket number TUC9-2013-0062US1, iscross-related to the following seventeen applications each listed as:docket number TUC9-2013-0058US1, docket number TUC9-2013-0095 US1,docket number TUC9-2013-0046 US1, docket number TUC9-2013-0096US1,docket number TUC9-2013-0097US1, docket number TUC9-2013-0098US1, docketnumber TUC9-2013-0059US1, docket number TUC9-2013-0099US1, docket numberTUC9-2013-0060US1, docket number TUC9-2013-0061US1, docket numberTUC9-2013-0074US1, docket number TUC9-2013-0100Us1, docket numberTUC9-2013-0091US1, docket number TUC9-2013-0101US1, docket numberTUC9-2013-0114US1, docket number TUC9-2013-0115US1, and docket numberTUC9-2013-0116US1 all of which are filed on the same day as the presentinvention and the entire contents of which are incorporated herein byreference and are relied upon for claiming the benefit of priority.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in general to computers, and moreparticularly to read ahead of digests in similarity based datadeduplication in a data deduplication system in a computing environment.

2. Description of the Related Art

In today's society, computer systems are commonplace. Computer systemsmay be found in the workplace, at home, or at school. Computer systemsmay include data storage systems, or disk storage systems, to processand store data. Large amounts of data have to be processed daily and thecurrent trend suggests that these amounts will continue beingever-increasing in the foreseeable future. An efficient way to alleviatethe problem is by using deduplication. The idea underlying adeduplication system is to exploit the fact that large parts of theavailable data are copied again and again, by locating repeated data andstoring only its first occurrence. Subsequent copies are replaced withpointers to the stored occurrence, which significantly reduces thestorage requirements if the data is indeed repetitive.

SUMMARY OF THE DESCRIBED EMBODIMENTS

In one embodiment, a method is provided for read ahead of digests insimilarity based data deduplication in a data deduplication system usinga processor device in a computing environment. In one embodiment, by wayof example only, input data is partitioned into data chunks and digestvalues are calculated for each of the data chunks. The positions andsizes of similar data intervals in a repository of data are found foreach of the data chunks. The positions and the sizes of read aheadintervals are calculated based on the similar data intervals. The readahead digests of the read ahead intervals are located and loaded intomemory in a background read ahead process.

In another embodiment, a computer system is provided for read ahead ofdigests in similarity based data deduplication in a data deduplicationsystem using a processor device, in a computing environment. Thecomputer system includes a computer-readable medium and a processor inoperable communication with the computer-readable medium. In oneembodiment, by way of example only, the processor partitions input datainto data chunks and calculates digest values for each of the datachunks. The positions and sizes of similar data intervals in arepository of data are found for each of the data chunks. The positionsand the sizes of read ahead intervals are calculated based on thesimilar data intervals. The read ahead digests of the read aheadintervals are located and loaded into memory in a background read aheadprocess.

In a further embodiment, a computer program product is provided for readahead of digests in similarity based data deduplication in a datadeduplication system in a data deduplication system using a processordevice, in a computing environment. The computer-readable storage mediumhas computer-readable program code portions stored thereon. Thecomputer-readable program code portions include a first executableportion that partitions input data into data chunks and calculatesdigest values for each of the data chunks. The positions and sizes ofsimilar data intervals in a repository of data are found for each of thedata chunks. The positions and the sizes of read ahead intervals arecalculated based on the similar data intervals. The read ahead digestsof the read ahead intervals are located and loaded into memory in abackground read ahead process.

In addition to the foregoing exemplary method embodiment, otherexemplary system and computer product embodiments are provided andsupply related advantages. The foregoing summary has been provided tointroduce a selection of concepts in a simplified form that are furtherdescribed below in the Detailed Description. This Summary is notintended to identify key features or essential features of the claimedsubject matter, nor is it intended to be used as an aid in determiningthe scope of the claimed subject matter. The claimed subject matter isnot limited to implementations that solve any or all disadvantages notedin the background.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the advantages of the invention will be readilyunderstood, a more particular description of the invention brieflydescribed above will be rendered by reference to specific embodimentsthat are illustrated in the appended drawings. Understanding that thesedrawings depict embodiments of the invention and are not therefore to beconsidered to be limiting of its scope, the invention will be describedand explained with additional specificity and detail through the use ofthe accompanying drawings, in which:

FIG. 1 is a block diagram illustrating a computing system environmenthaving an example storage device in which aspects of the presentinvention may be realized;

FIG. 2 is a block diagram illustrating a hardware structure of datastorage system in a computer system in which aspects of the presentinvention may be realized;

FIG. 3 is a flowchart illustrating an exemplary method for digestretrieval based on similarity search in deduplication processing in adata deduplication system in which aspects of the present invention maybe realized;

FIG. 4 is a flowchart illustrating an exemplary alternative method fordigest retrieval based on similarity search in deduplication processingin a data deduplication system in which aspects of the present inventionmay be realized;

FIG. 5 is a flowchart illustrating an exemplary method for efficientcalculation of both similarity search values and boundaries of digestblocks using a single linear calculation of rolling hash values in adata deduplication system in which aspects of the present invention maybe realized;

FIG. 6 is a block diagram illustrating a global digests cache structurecontaining which aspects of the present invention may be realized

FIG. 7 is a flowchart illustrating an exemplary method for utilizing aglobal digests cache in a deduplication operation in a datadeduplication system in which aspects of the present invention may berealized; and

FIG. 8 is a flowchart illustrating an exemplary alternative method forutilizing a global digests cache in a deduplication operation in a datadeduplication system in which aspects of the present invention may berealized;

FIG. 9 is a flowchart illustrating an exemplary method for calculatingand dispatching background tasks of digests read-ahead in similaritybased deduplication in a data deduplication system in which aspects ofthe present invention may be realized;

FIG. 10 is a flowchart illustrating an exemplary method for backgroundprocessing of digests read ahead tasks in which aspects of the presentinvention may be realized; and

FIG. 11 is a flowchart illustrating an exemplary method 1100 for adeduplication process with read-ahead of digests in a data deduplicationsystem in which aspects of the present invention may be realized.

DETAILED DESCRIPTION OF THE DRAWINGS

Data deduplication is a highly important and vibrant field in computingstorage systems. Data deduplication refers to the reduction and/orelimination of redundant data. In data deduplication, a data object,which may be a file, a data stream, or some other form of data, ispartitioned into one or more parts called chunks or blocks. In a datadeduplication process, duplicate copies of data are reduced oreliminated, leaving a minimal amount of redundant copies, or a singlecopy of the data, respectively. The goal of a data deduplication systemis to store a single copy of duplicated data, and the challenges inachieving this goal are efficiently finding the duplicate data patternsin a typically large repository, and storing the data patterns in astorage efficient deduplicated form. A significant challenge indeduplication storage systems is scaling to support very largerepositories of data. Such large repositories can reach sizes ofPetabytes (1 Petabyte=2⁵⁰ bytes) or more. Deduplication storage systemssupporting such repository sizes, must provide efficient processing forfinding duplicate data patterns within the repositories, whereefficiency is measured in resource consumption for achievingdeduplication (resources may be CPU cycles, RAM storage, persistentstorage, networking, etc.). In one embodiment, a deduplication storagesystem may be based on maintaining a search optimized index of valuesknown as fingerprints or digests, where a small fingerprint represents alarger block of data in the repository. The fingerprint values may becryptographic hash values calculated based on the blocks' data. In oneembodiment, secure hash algorithm (SHA), e.g. SHA-1 or SHA-256, whichare a family of cryptographic hash functions, may be used. Identifyingfingerprint matches, using index lookup, enables to store references todata that already exists in a repository. In one embodiment, determiningsegment boundaries may be performed based on the data itself.

To provide reasonable deduplication in this approach, the mean size ofthe data blocks based on which fingerprints are generated must belimited to smaller sizes and may not be too large. The reason being thata change of a bit within a data block will probabilistically change thedata block's corresponding fingerprint, and thus having large datablocks makes the scheme more sensitive to updates in the data ascompared to having small blocks. A typical data block size may rangefrom 4 KB to 64 KB, depending on the type of application and workload.Thus, by way of example only, small data blocks may range in sizes of upto 64 KB, and large data blocks are those data blocks having a sizelarger than 64 KB.

To support very large repositories scaling to Petabytes (e.g.,repositories scaling to at least one Petabyte), the number offingerprints to store coupled with the size of a fingerprint (rangingbetween 16 bytes and 64 bytes), becomes prohibitive. For example, for 1Petabyte of deduplicated data, with a 4 KB mean data block size, and 32bytes fingerprint size (e.g. of SHA-256), the storage required to storethe fingerprints is 8 Terabytes. Maintaining a search optimized datastructure for such volumes of fingerprints is difficult, and requiresoptimization techniques. However existing optimization techniques do notscale to these sizes while maintaining performance. For this reason, toprovide reasonable performance, the supported repositories have to berelatively small (on the order of tens of TB). Even for smaller sizes,considerable challenges and run-time costs arise due to the large scaleof the fingerprint indexes that create a bottle-neck in deduplicationprocessing.

To solve this problem, in one embodiment, a deduplication system may bebased on a two-step approach for searching data patterns duringdeduplication. In the first step, a large chunk of incoming data (e.g. afew megabytes) is searched in the repository for similar (rather thanidentical) data chunks of existing data, and the incoming data chunk ispartitioned accordingly into intervals and paired with corresponding(similar) repository intervals. In the second step, a byte-wise matchingalgorithm is applied on pairs of similar intervals, to identifyidentical sub-intervals, which are already stored in a repository ofdata. The matching algorithm of the second step relies on reading allthe relevant similar data in the repository in order to compare itbyte-wise to the input data.

Yet, a problem stemming from a byte-wise comparison of data underlyingthe matching algorithm of the second step, is that data of roughly thesame size and rate as the incoming data should be read from therepository, for comparison purposes. For example, a system processing 1GB of incoming data per second, should read about 1 GB of data persecond from the repository for byte-wise comparison. This requiressubstantially high capacities of I/O per second of the storage devicesstoring the repository data, which in turn increases their cost.

Additional trends in information technology coinciding with the aboveproblem are the following: (1) Improvements in the computing ability byincreasing CPU speeds and the number of CPU cores. (2) Increase in diskdensity, while disk throughput remains relatively constant or improvingonly modestly. This means that there are fewer spindles relative to thedata capacity, thus practically reducing the overall throughput. Due tothe problem specified above, there is a need to design an alternativesolution, to be integrated in a two step deduplication system embodimentspecified above, that does not require reading from the repository inhigh rates/volumes.

Therefore, in one embodiment, by way of example only, additionalembodiments address these problem, as well as shifts resourceconsumption from disks to the CPUs, to benefit from the above trends.The embodiments described herein are integrated within the two-step andscalable deduplication embodiments embodiment described above, and usesa similarity search to focus lookup of digests during deduplication. Inone embodiment, a global similarity search is used as a basis forfocusing the similarity search for digests of repository data that ismost likely to match input data.

The embodiments described herein significantly reduce the capacity ofI/O per second required of underlying disks, benefit from the increasesin computing ability and in disk density, and considerably reduce thecosts of processing, as well as maintenance costs and environmentaloverhead (e.g. power consumption).

In one embodiment, input data is segmented into small segments (e.g. 4KB) and a digest (a cryptographic hash value, e.g. SHAT) is calculatedfor each such segment. First, a similarity search algorithm, asdescribed above, is applied on an input chunk of data (e.g. 16 MB), andthe positions of the most similar reference data in the repository arelocated and found. These positions are then used to lookup the digestsof the similar reference data. The digests of all the data contained inthe repository are stored and retrieved in a form that corresponds totheir occurrence in the data. Given a position of a section of datacontained in the repository, the digests associated with the section ofdata are efficiently located in the repository and retrieved. Next,these reference digests are loaded into memory, and instead of comparingdata to find matches, the input digests and the loaded reference digestsare matched.

The described embodiments provide a new fundamental approach forarchitecting a data deduplication system, which integrates a scalabletwo step approach of similarity search followed by a search of identicalmatching segments, with an efficient and cost effectivedigest/fingerprint based matching algorithm (instead of byte-wise datacomparison). The digest/fingerprint based matching algorithm enables toread only a small fraction (1%) of the volume of data required bybyte-wise data comparison. The present invention proposed herein, adeduplication system can provide high scalability to very large datarepositories, in addition to high efficiency and performance, andreduced costs of processing and hardware.

In one embodiment, by way of example only, the term “similar data” maybe referred to as: for any given input data, data which is similar tothe input data is defined as data which is mostly the same (i.e. notentirely but at least 50% similar) as the input data. From looking atthe data in a binary view (perspective), this means that similar data isdata where most (i.e. not entirely but at least 50% similar) of thebytes are the same as the input data.

In one embodiment, by way of example only, the term “similar search” maybe referred to as the process of searching for data which is similar toinput data in a repository of data. In one embodiment, this process maybe performed using a search structure of similarity elements, which ismaintained and searched within.

In one embodiment, by way of example only, the term “similarityelements” may be calculated based on the data and facilitate a globalsearch for data which is similar to input data in a repository of data.In general, one or more similarity elements are calculated, andrepresent, a large (e.g. at least 16 MB) chunk of data.

Thus, the various embodiments described herein provide various solutionsfor digest retrieval based on a similarity search in deduplicationprocessing in a data deduplication system using a processor device in acomputing environment. In one embodiment, by way of example only, inputdata is partitioned into fixed sized data chunks. Similarity elements,digest block boundaries and digest values are calculated for each of thefixed sized data chunks. Matching similarity elements are searched forin a search structure (i.e. index) containing the similarity elementsfor each of the fixed sized data chunks in a repository of data.Positions of similar data are located in a repository. The positions ofthe similar data are used to locate and load into the memory storeddigest values and corresponding stored digest block boundaries of thesimilar data in the repository. It should be noted that in oneembodiment the positions may be either physical or logical (i.e.virtual). The positions are of data inside a repository of data. Theimportant property of a ‘position’ is that given a position (physical orlogical) in the repository's data, the data in that position can beefficiently located and accessed. The digest values and thecorresponding digest block boundaries are matched with the stored digestvalues and the corresponding stored digest block boundaries to find datamatches.

Thus, the various embodiments described herein provide various solutionsfor digest retrieval based on a similarity search in deduplicationprocessing in a data deduplication system using a processor device in acomputing environment. In one embodiment, by way of example only, inputdata is partitioned into fixed sized data chunks. Similarity elements,digest block boundaries and digest values are calculated for each of thefixed sized data chunks. Matching similarity elements are searched forin a search structure (i.e. index) containing the similarity elementsfor each of the fixed sized data chunks in a repository of data.Positions of similar data are located in a repository. The positions ofthe similar data are used to locate and load into the memory storeddigest values and corresponding stored digest block boundaries of thesimilar data in the repository. The digest values and the correspondingdigest block boundaries are matched with the stored digest values andthe corresponding stored digest block boundaries to find data matches.

In one embodiment, the present invention provides a solution forutilizing a similarity search to load into memory the relevant digestsfrom the repository, for efficient deduplication processing. In a datadeduplication system, deduplication is performed by partitioning thedata into large fixed sized chunks, and for each chunk calculating (2things—similarity elements and digest blocks/digest values) hash values(digest block/digest value) for similarity search and digest values. Thedata deduplication system searches for matching similarity values of thechunks in a search structure of similarity values, and finds thepositions of similar data in the repository. The data deduplicationsystem uses these positions of similar data to locate and load intomemory stored digests of the similar repository data, and matching inputand repository digest values to find data matches.

In one embodiment, the present invention provides for efficientcalculation of both similarity search values and segmentation (i.e.boundaries) of digest blocks using a single linear calculation ofrolling hash values. In a data deduplication system, the input data ispartitioned into chunks, and for each chunk a set of rolling hash valuesis calculated. A single linear scan of the rolling hash values producesboth similarity search values and boundaries of the digest blocks of thechunk. Each rolling hash value corresponds to a consecutive window ofbytes in byte offsets. The similarity search values are used to searchfor similar data in the repository. The digest blocks segmentation isused to calculate digest block boundaries and corresponding digestvalues of the chunk, for digests matching. Each rolling hash valuecontributes to the calculation of the similarity values and to thecalculation of the digest blocks segmentations. Each rolling hash valuemay be discarded after contributing to the calculations. The describedembodiment provides significant processing efficiency and reduction ofCPU consumption, as well as considerable performance improvement.

Thus, as described above, the deduplication approach of the presentinvention uses a two-step process for searching data patterns duringdeduplication. In the first step, a large chunk of incoming data (e.g.16 megabytes “MB”) is searched in the repository for similar (ratherthan identical) chunks of existing data, and the incoming chunk ispartitioned accordingly into intervals, and paired with corresponding(similar) repository intervals. The similarity search structure (or“index”) used in the first step is compact and simple to maintain andsearch within, because the elements used for a similarity search arevery compact relative to the data they represent (e.g. 16 bytesrepresenting 4 megabytes). Further included in the first step, inaddition to a calculation of similarity elements, is a calculation ofdigest segments and respective digest values for the input chunk ofdata. All these calculations are based on a single calculation ofrolling hash values. In the second step, reference digests of thesimilar repository intervals are retrieved, and then the input digestsare matched with the reference digests, to identify data matches.

In one embodiment, in the similarity based deduplication approach asdescribed herein, a stream of input data is partitioned into chunks(e.g. at least 16 MB), and each chunk is processed in two main steps. Inthe first step a similarity search process is applied, and positions ofthe most similar reference data in the repository are found. Within thisstep both similarity search elements and digest segments boundaries arecalculated for the input chunk, based on a single linear calculation ofrolling hash values. Digest values are calculated for the input chunkbased on the produced segmentation, and stored in memory in the sequenceof their occurrence in the input data. The positions of similar data arethen used to lookup the digests of the similar reference data and loadthese digests into memory, also in a sequential form. Then, the inputdigests are matched with the reference digests to form data matches.

When deduplication of an input chunk of data is complete, the inputchunk of data's associated digests are stored in the repository, toserve as reference digests for subsequent input data. The digests arestored in a linear form, which is independent of the deduplicated formby which the data these digests describe is stored, and in the sequenceof their occurrence in the data. This method of storage enablesefficient retrieval of sections of digests, independent of fragmentationcharacterizing deduplicated storage forms, and thus low on IO andcomputational resource consumption.

In addition, to solve the bottleneck problem as described above, in oneembodiment, a deduplication system, as described herein, may use the twostep approach for searching data patterns during deduplication. In thefirst step, a large chunk of incoming data (e.g. a few megabytes) issearched in the repository for similar (rather than identical) datachunks of existing data, and the incoming data chunk is partitionedaccordingly into intervals and paired with corresponding (similar)repository intervals. The similarity index used in this step is verycompact and simple to maintain and search within, since the elementsused for similarity search are very compact relative to the data theyrepresent (e.g. 16 bytes representing 4 megabytes). Further included inthe first step is a calculation of similarity elements as well as digestsegments and respective digest values, of the input chunk of data. Thesecalculations are based on a single calculation of rolling hash values.In the second step, reference digests of the similar repositoryintervals are retrieved, and then the input digests are matched with thereference digests, to identify data matches. This approach works verywell on data sets where the generations of data have a low to moderatechange rate (roughly up to 30% change rate) relative to previousgenerations. Such change rates are very typical for the most common usecases, and are specifically typical for data backup environments.

However, there are two main effects on the data that can impact theresults of the similarity search step. One effect is a high change rate,namely a given generation of data is considerably different than aprevious generation of the same data set. A high change rate (e.g. morethan 30%), may cause the similarity elements calculated for an incomingchunk of data to be considerably different than any of the similarityelements already existing in the repository, and thus may impact theability to find appropriate similar data in the repository. A secondeffect is internal reordering of sections in the data. Specifically,mixing sections of data among chunks that are processed for similarity,relative to their positions in previous generations, may again cause thesimilarity elements calculated for an incoming chunk to be differentthan existing similarity elements, thus possibly impacting the abilityto find appropriate similar data in the repository. A typical use casethat can cause such reordering in a backup environment, is multiplexingof the backed-up data. In such a use case a data set is read byconcurrent backup processes, which compete on reading sections of thedata set, resulting in each stream being constructed from sections ofdata coming from arbitrary positions in the data set.

A further observation regarding multiplexing is that although this maycause sections of the data to arrive in a mixed order relative toprevious generations, the data that is steamed in within the concurrentbackup streams is related. Namely, repository data that is identified assimilar with regards to a specific stream, may likely be also relevantfor other concurrent streams.

Thus a need exists to design a solution for the problem specified above,that will enable to achieve improved deduplication results for workloadswith high change rates, or with reordering within the data, and forworkload where multiplexing is used. This solution should also benefitfrom the characteristic of multiplexed data specified above.

In one embodiment, by way of example only, the present invention solvesthis problem, as well as benefits from the multiplexed datacharacteristics. The present invention provides considerable additionalimprovement in the deduplication results for high change rate and/orinternally reordered workloads, further enhancing the effectiveness andscalability of similarity based deduplication.

In one embodiment, by way of example only, in the first step, asdescribed herein, a similarity search process is applied on an inputchunk of data (e.g. 16 MB), and the positions of the most similarreference data in the repository are found. Within this step bothsimilarity search elements and digest segments boundaries are calculatedfor the input chunk, based on a single linear calculation of rollinghash values. Digest values are calculated for the input chunk based onthe produced segmentation, and stored in a memory buffer in the sequenceof their occurrence in the input data. The positions of similar data arethen used to lookup the digests of the similar reference data. In oneembodiment, the digests of the data contained in the repository arestored and retrieved in a form that corresponds to their occurrence inthe data. Given a position and size of a section of data contained inthe repository, its associated digests are efficiently located in therepository and retrieved. In other words, the positions of similar dataare then used to lookup the digests of the similar reference data andload these digests into the global digests cache, where the digests arestored in a sequential form corresponding to their occurrence in thedata, and a dedicated search structure facilitates efficient searchwithin the global digests cache. Each chunk processing operation loadsits relevant repository digests into the global digests cache, howeverdoes not remove this contents from the cache after processing. Removalof digests from the global digests cache is governed by a Least RecentlyUsed (LRU) policy, to maximize the reuse potential of digests alreadyloaded into the global digests cache. Then, the input digests aresearched in the global digests cache, considering all its contents, tofind and extend sequences of matched digests.

In one embodiment, the present invention loads the digests of thesimilar repository data into a global cache of digests (rather than alocal cache). This cache is global in the sense that it contains aplurality of repository digests that were loaded for processing andcomparison, not only in a current operation of processing an individualchunk of incoming data, but rather in multiple such operations thatoccurred recently. After loading digests of similar repository intervalsinto the global cache, the digests matching process proceeds to searchinput digests in the global cache (rather than in a local cache). Theglobal cache consists of a pool of sequential arrays of digest entries,and a hash table. The sequential arrays are used to load sequences ofrepository digests into memory, and the hash table enables toefficiently search within the cache's contents. The hash table entriespoint to contents within the sequential arrays.

It should be noted that without a global digests cache, each individualoperation of processing an input chunk of data would load its relevantrepository digests, and then remove this contents from memory once thechunk processing operation is complete. With the global digests cache,each chunk processing operation loads its relevant repository digestsinto memory, however does not remove this contents from memory afterprocessing. Instead, the removal of digests from the global cache isgoverned by a Least Recently Used (LRU) policy, to maximize the reusepotential of digests already loaded into the cache. In one embodimentthe LRU policy is applied on the sequential arrays of digests. Namely,when new contents should be loaded and there are no empty arrays, theleast recently used array (which is not in current usage) is used toload the required contents.

Essentially, the global cache reflects a certain window of timebackwards from the current time, in terms of digests that were processedfor deduplication. When searching for input digests, not only thedigests loaded from the repository by the current chunk processingoperation are considered, but also digests that were previously loadedby other chunk processing operations, within the time window reflectedby the cache. Digests that were previously loaded in a recent time framemay be very relevant for a current chunk processing operation. Forinstance, in cases of reordering of sections in the data betweengenerations of a data set, and especially with multiplexing, it is veryprobable that digests loaded by different operations or differentstreams will be relevant for deduplication of other operations orstreams currently being processed. For this reason, the global digestscache considerably improves the deduplication results for internallyreordered and/or high change rate workloads, further enhancing theeffectiveness and scalability of similarity based deduplication systems.

In one embodiment, the present invention provides for utilizing a globaldigests cache in a similarity based deduplication process to improve thededuplication results, especially for internally reordered and/or highchange rate workloads. In one embodiment of the data deduplicationsystem, a deduplication process includes partitioning the data intochunks, and for each chunk calculating digest values, finding thepositions of similar data in the repository, locating and loading thedigests of the similar repository data into a global memory cache ofdigests, where the cache contains digests that were loaded also by otherdeduplication operations, and finally matching input and repositorydigests contained in the global memory cache of digests to find datamatches.

In an alternative embodiment, the present invention provides forutilizing a global digests cache in the similarity based deduplicationprocess, specifically in a case where similar data is not found in therepository. In one embodiment of the data deduplication system, adeduplication process includes partitioning the data into chunks, andfor each chunk calculating digest values, and if a search for similardata in the repository does not provide results then matching input andrepository digests contained in a global memory cache of digests to finddata matches.

In an alternative embodiment, the present invention provides forutilizing a global digests cache in the similarity based deduplicationprocess, where if similar repository data is found, preferring matcheswith repository digests of the similar repository data (vs. matches withdigests of other repository data which was not determined as the similarrepository data). In one embodiment of the data deduplication system, adeduplication process includes partitioning the data into chunks, andfor each chunk calculating digest values, finding the positions ofsimilar data in the repository, locating and loading the digests of thesimilar repository data into a global memory cache of digests, matchinginput and repository digests contained in the global memory cache ofdigests, and preferring matches with repository digests in the cachewhich are of the similar repository data.

In an alternative embodiment, the present invention provides for asparse hash table within a global digests cache, where sampling isapplied to load digests into the hash table, and the sparseness enablesto increase the time window reflected by the global cache oralternatively reduce the memory consumption of the global cache. In oneembodiment of the data deduplication system, a deduplication processincludes partitioning the data into chunks, and for each chunkcalculating digest values, finding the positions of similar data in therepository, locating and loading the digests of the similar repositorydata into a global memory cache of digests, and loading a sample of therepository digests into a search mechanism within the cache. Thesampling of the repository digests is applied for loading the repositorydigests into the hash table. The hash table is a sparse hash table andthe sparseness of the hash table enables to increase a time windowreflected by the global digests cache and also reduces a memoryconsumption of the global digests cache. The sample may include a firstdigest of each fixed sized sequence of repository digests. A density ofthe sampling may be tuned for each workload, or for each section ofinput data, in accordance with the deduplication results of the workloador the section of the input data.

To further improve deduplication results for workloads characterized byhigh change rates and/or internal reordering of sections in the data(e.g. caused by multiplexing), between generations of a data set, aglobal memory cache of digests is introduced, used by the deduplicationprocess for loading repository digests into memory. This cache is globalin the sense that it contains a plurality of repository digests thatwere loaded for processing and comparison, not only in a currentoperation of processing an individual chunk of incoming data, but ratherin multiple such operations that occurred recently. After loadingdigests of similar repository intervals into the global digests cache,the digests matching process proceeds to search input digests in theglobal digests cache (rather than in a local digests cache).

However, while reading of digests is efficient versus reading actualdata, this still requires disk access. It will be considerably moreefficient if, at the time when the deduplication process identifiessimilar repository data and its associated digests, these digests willbe already available in the global digests cache for digests matching.This will enable to perform most of the digests reading operations inparallel to the deduplication process (instead of in a blocking mannerin the foreground), thus resulting in increased efficiency andthroughput. There is therefore a need to design a mechanism that willenable prefetching into the digests cache, of repository digests thatare most likely to be required in further deduplication processing.

Moreover, underlying the present invention, as described in the variousembodiments described above, is an observation, which has been proven tobe characteristic of backup environments, that when an interval ofrepository data is identified as similar to a chunk of input data, thereis high probability that the data following this interval in therepository will be referenced shortly after by subsequent input data.

Based on this observation, the algorithm of the present inventionpredicts which repository digests will be needed for subsequent inputdata, based on the results of the similarity search process, and thenloads these digests into the global digests cache via a backgroundprocess. In this way these digests are already available in the globaldigests cache at the time they are needed by deduplication processing ofsubsequent chunks of input data. The benefit of this algorithm isperforming most of the digests reading operations in parallel to thededuplication process (instead of in the foreground), thus resulting inincreased efficiency and throughput of the overall deduplicationprocess.

Thus, in one embodiment, within the processing of a given input datachunk there is a point where specific repository intervals of data areidentified as similar to the input chunk. If processing of the inputchunk preceding the current data chunk in the steam of input data,resulted in good deduplication, then the similar repository intervalsidentified for the current input chunk are those following the dataintervals identified as similar to the previous input chunk. If on theother hand, the processing of the input chunk preceding the currentchunk in the steam of input data, resulted in insufficientdeduplication, then similarity search is activated for the current inputchunk, and similar repository intervals are identified via the processof similarity search.

In one embodiment, by way of example only, input data is partitionedinto data chunks and digest values are calculated for each of the datachunks. The positions and sizes of similar data intervals in arepository of data are found for each of the data chunks. The positionsand the sizes of read ahead intervals are calculated. The read aheaddigests of the read ahead intervals are located and loaded into memoryin a background read ahead process.

Turning now to FIG. 1, exemplary architecture 10 of a computing systemenvironment is depicted. The computer system 10 includes centralprocessing unit (CPU) 12, which is connected to communication port 18and memory device 16. The communication port 18 is in communication witha communication network 20. The communication network 20 and storagenetwork may be configured to be in communication with server (hosts) 24and storage systems, which may include storage devices 14. The storagesystems may include hard disk drive (HDD) devices, solid-state devices(SSD) etc., which may be configured in a redundant array of independentdisks (RAID). The operations as described below may be executed onstorage device(s) 14, located in system 10 or elsewhere and may havemultiple memory devices 16 working independently and/or in conjunctionwith other CPU devices 12. Memory device 16 may include such memory aselectrically erasable programmable read only memory (EEPROM) or a hostof related devices. Memory device 16 and storage devices 14 areconnected to CPU 12 via a signal-bearing medium. In addition, CPU 12 isconnected through communication port 18 to a communication network 20,having an attached plurality of additional computer host systems 24. Inaddition, memory device 16 and the CPU 12 may be embedded and includedin each component of the computing system 10. Each storage system mayalso include separate and/or distinct memory devices 16 and CPU 12 thatwork in conjunction or as a separate memory device 16 and/or CPU 12.

FIG. 2 is an exemplary block diagram 200 showing a hardware structure ofa data storage system in a computer system according to the presentinvention. Host computers 210, 220, 225, are shown, each acting as acentral processing unit for performing data processing as part of a datastorage system 200. The cluster hosts/nodes (physical or virtualdevices), 210, 220, and 225 may be one or more new physical devices orlogical devices to accomplish the purposes of the present invention inthe data storage system 200. In one embodiment, by way of example only,a data storage system 200 may be implemented as IBM® ProtecTIER®deduplication system TS7650G™. A Network connection 260 may be a fibrechannel fabric, a fibre channel point to point link, a fibre channelover ethernet fabric or point to point link, a FICON or ESCON I/Ointerface, any other I/O interface type, a wireless network, a wirednetwork, a LAN, a WAN, heterogeneous, homogeneous, public (i.e. theInternet), private, or any combination thereof. The hosts, 210, 220, and225 may be local or distributed among one or more locations and may beequipped with any type of fabric (or fabric channel) (not shown in FIG.2) or network adapter 260 to the storage controller 240, such as Fibrechannel, FICON, ESCON, Ethernet, fiber optic, wireless, or coaxialadapters. Each of the hosts, 210, 220, and 225 may also be incommunication and association with the storage controller 240. Datastorage system 200 is accordingly equipped with a suitable fabric (notshown in FIG. 2) or network adaptor 260 to communicate. Data storagesystem 200 is depicted in FIG. 2 comprising storage controllers 240 andcluster hosts 210, 220, and 225. The cluster hosts 210, 220, and 225 mayinclude cluster nodes.

To facilitate a clearer understanding of the methods described herein,storage controller 240 is shown in FIG. 2 as a single processing unit,including a microprocessor 242, system memory 243 and nonvolatilestorage (“NVS”) 216. It is noted that in some embodiments, storagecontroller 240 is comprised of multiple processing units, each withtheir own processor complex and system memory, and interconnected by adedicated network within data storage system 200. Storage 230 (labeledas 230 a, 230 b, and 230 n in FIG. 3) may be comprised of one or morestorage devices, such as storage arrays, which are connected to storagecontroller 240 (by a storage network) with one or more cluster hosts210, 220, and 225 connected to each storage controller 240.

In some embodiments, the devices included in storage 230 may beconnected in a loop architecture. Storage controller 240 manages storage230 and facilitates the processing of write and read requests intendedfor storage 230. The system memory 243 of storage controller 240 storesprogram instructions and data, which the processor 242 may access forexecuting functions and method steps of the present invention forexecuting and managing storage 230 as described herein. In oneembodiment, system memory 243 includes, is in association with, or is incommunication with the operation software 250 for performing methods andoperations described herein. As shown in FIG. 2, system memory 243 mayalso include or be in communication with a cache 245 for storage 230,also referred to herein as a “cache memory”, for buffering “write data”and “read data”, which respectively refer to write/read requests andtheir associated data. In one embodiment, cache 245 is allocated in adevice external to system memory 243, yet remains accessible bymicroprocessor 242 and may serve to provide additional security againstdata loss, in addition to carrying out the operations as described inherein.

In some embodiments, cache 245 is implemented with a volatile memory andnon-volatile memory and coupled to microprocessor 242 via a local bus(not shown in FIG. 2) for enhanced performance of data storage system200. The NVS 216 included in data storage controller is accessible bymicroprocessor 242 and serves to provide additional support foroperations and execution of the present invention as described in otherfigures. The NVS 216, may also referred to as a “persistent” cache, or“cache memory” and is implemented with nonvolatile memory that may ormay not utilize external power to retain data stored therein. The NVSmay be stored in and with the cache 245 for any purposes suited toaccomplish the objectives of the present invention. In some embodiments,a backup power source (not shown in FIG. 2), such as a battery, suppliesNVS 216 with sufficient power to retain the data stored therein in caseof power loss to data storage system 200. In certain embodiments, thecapacity of NVS 216 is less than or equal to the total capacity of cache245.

Storage 230 may be physically comprised of one or more storage devices,such as storage arrays. A storage array is a logical grouping ofindividual storage devices, such as a hard disk. In certain embodiments,storage 230 is comprised of a JBOD (Just a Bunch of Disks) array or aRAID (Redundant Array of Independent Disks) array. A collection ofphysical storage arrays may be further combined to form a rank, whichdissociates the physical storage from the logical configuration. Thestorage space in a rank may be allocated into logical volumes, whichdefine the storage location specified in a write/read request.

In one embodiment, by way of example only, the storage system as shownin FIG. 2 may include a logical volume, or simply “volume,” may havedifferent kinds of allocations. Storage 230 a, 230 b and 230 n are shownas ranks in data storage system 200, and are referred to herein as rank230 a, 230 b and 230 n. Ranks may be local to data storage system 200,or may be located at a physically remote location. In other words, alocal storage controller may connect with a remote storage controllerand manage storage at the remote location. Rank 230 a is shownconfigured with two entire volumes, 234 and 236, as well as one partialvolume 232 a. Rank 230 b is shown with another partial volume 232 b.Thus volume 232 is allocated across ranks 230 a and 230 b. Rank 230 n isshown as being fully allocated to volume 238—that is, rank 230 n refersto the entire physical storage for volume 238. From the above examples,it will be appreciated that a rank may be configured to include one ormore partial and/or entire volumes. Volumes and ranks may further bedivided into so-called “tracks,” which represent a fixed block ofstorage. A track is therefore associated with a given volume and may begiven a given rank.

The storage controller 240 may include a data duplication module 255, asimilarity index module 257 (e.g., a similarity search structure), asimilarity search module 259, and a global digests cache module 270. Thedata duplication module 255, the similarity index module 257, thesimilarity search module 259, and the global digests cache module 270may work in conjunction with each and every component of the storagecontroller 240, the hosts 210, 220, 225, and storage devices 230. Thedata duplication module 255, the similarity index module 257, thesimilarity search module 259, and the global digests cache module 270may be structurally one complete module or may be associated and/orincluded with other individual modules. The data duplication module 255,the similarity index module 257, the similarity search module 259, andthe global digests cache module 270 may also be located in the cache 245or other components.

The storage controller 240 includes a control switch 241 for controllingthe fiber channel protocol to the host computers 210, 220, 225, amicroprocessor 242 for controlling all the storage controller 240, anonvolatile control memory 243 for storing a microprogram (operationsoftware) 250 for controlling the operation of storage controller 240,data for control, cache 245 for temporarily storing (buffering) data,and buffers 244 for assisting the cache 245 to read and write data, acontrol switch 241 for controlling a protocol to control data transferto or from the storage devices 230, the data duplication module 255, thesimilarity index module 257, the similarity search module 259, and theglobal digests cache module 270, in which information may be set.Multiple buffers 244 may be implemented with the present invention toassist with the operations as described herein. In one embodiment, thecluster hosts/nodes, 210, 220, 225 and the storage controller 240 areconnected through a network adaptor (this could be a fibre channel) 260as an interface i.e., via at least one switch called “fabric.”

In one embodiment, the host computers or one or more physical or virtualdevices, 210, 220, 225 and the storage controller 240 are connectedthrough a network (this could be a fibre channel) 260 as an interfacei.e., via at least one switch called “fabric.” In one embodiment, theoperation of the system shown in FIG. 2 will be described. Themicroprocessor 242 may control the memory 243 to store commandinformation from the host device (physical or virtual) 210 andinformation for identifying the host device (physical or virtual) 210.The control switch 241, the buffers 244, the cache 245, the operatingsoftware 250, the microprocessor 242, memory 243, NVS 216, dataduplication module 255, the similarity index module 257, the similaritysearch module 259, and the global digests cache module 270 are incommunication with each other and may be separate or one individualcomponent(s). Also, several, if not all of the components, such as theoperation software 250 may be included with the memory 243. Each of thecomponents within the devices shown may be linked together and may be incommunication with each other for purposes suited to the presentinvention. As mentioned above, the data duplication module 255, thesimilarity index module 257, the similarity search module 259, and theglobal digests cache module 270 may also be located in the cache 245 orother components. As such, the data duplication module 255, thesimilarity index module 257, the similarity search module 259, and theglobal digests cache module 270 maybe used as needed, based upon thestorage architecture and users preferences.

As mentioned above, in one embodiment, the input data is partitionedinto large fixed size chunks (e.g. 16 MB), and a similarity searchprocedure is applied for each input chunk. A similarity search procedurecalculates compact similarity elements, based on the input chunk ofdata, and searches for matching similarity elements stored in a compactsearch structure (i.e. index) in the repository. The size of thesimilarity elements stored per each chunk of data is typically 32 bytes(where the chunk size is a few megabytes), thus making the searchstructure storing the similarity elements very compact and simple tomaintain and search within.

The similarity elements are calculated by calculating rolling hashvalues for the chunk's data, namely producing a rolling hash value foreach consecutive window of bytes in a byte offset, and then selectingspecific hash values and associated positions (not necessarily the exactpositions of these hash values) to be the similarity elements of thechunk.

One important aspect and novelty provided by the present invention isthat a single linear calculation of rolling hash values, which is acomputationally expensive operation, serves as basis for calculatingboth the similarity elements of a chunk (for a similarity search) andthe segmentation of the chunk's data into digest blocks (for findingexact matches). Each rolling hash value is added to the calculation ofthe similarity elements as well as to the calculation of the digestblocks segmentation. After being added to the two calculations, arolling hash value can be discarded, as the need to store the rollinghash values is minimized or eliminated. This algorithmic elementprovides significant efficiency and reduction of CPU consumption, aswell as considerable performance improvement.

In one embodiment, the similarity search procedure of the presentinvention produces two types of output. The first type of output is aset of positions of the most similar reference data in the repository.The second type of output is the digests of the input chunk, comprisingof the segmentation to digest blocks and the digest values correspondingto the digest blocks, where the digest values are calculated based onthe data of the digest blocks.

In one embodiment, the digests are stored in the repository in a formthat corresponds to the digests occurrence in the data. Given a positionin the repository and size of a section of data, the location in therepository of the digests corresponding to that interval of data isefficiently determined. The positions produced by the similarity searchprocedure are then used to lookup the stored digests of the similarreference data, and to load these reference digests into memory. Then,rather than comparing data, the input digests and the loaded referencedigests are matched. The matching process is performed by loading thereference digests into a compact search structure of digests in memory,and then for each input digest, querying the search structure of digestsfor existence of that digest value. Search in the search structure ofdigests is performed based on the digest values. If a match is found,then the input data associated with that digest is determined to befound in the repository and the position of the input data in therepository is determined based on the reference digest's position in therepository. In this case, the identity between the input data covered bythe input digest, and the repository data covered by the matchingreference digest, is recorded. If a match is not found then the inputdata associated with that digest is determined to be not found in therepository, and is recorded as new data. In one embodiment, thesimilarity search structure is a global search structure of similarityelements, and a memory search structure of digests' is a local searchstructure of digests in memory. The search in the memory searchstructure of digests is performed by the digest values.

FIG. 3 is a flowchart illustrating an exemplary method 300 for digestretrieval based on similarity search in deduplication processing in adata deduplication system in which aspects of the present invention maybe realized. The method 300 begins (step 302). The method 300 partitionsinput data into data chunks (step 304). The input data may bepartitioned into fixed sized data chunks. The method 300 calculates, foreach of the data chunks, similarity elements, digest block boundaries,and corresponding digest values are calculated (step 306). The method300 searches for matching similarity elements in a search structure(i.e. index) for each of the data chunks (which may be fixed size datachunks) (step 308). The positions of the similar data in a repository(e.g., a repository of data) are located (step 310). The method 300 usesthe positions of the similar data to locate and load into memory storeddigest values and corresponding stored digest block boundaries of thesimilar data in the repository (step 312). The method 300 matches thedigest values and the corresponding digest block boundaries of the inputdata with the stored digest values and the corresponding stored digestblock boundaries to find data matches (step 314). The method 300 ends(step 316).

FIG. 4 is a flowchart illustrating an exemplary alternative method 400for digest retrieval based on similarity search in deduplicationprocessing in a data deduplication system in which aspects of thepresent invention may be realized. The method 400 begins (step 402). Themethod 400 partitions the input data into chunks (e.g., partitions theinput data into large fixed size chunks) (step 404), and for an inputdata chunk calculates rolling hash values, similarity elements, digestblock boundaries, and digest values based on data of the input datachunk (step 406). The method 400 searches for similarity elements of theinput data chunk in a similarity search structure (i.e. index) (step 408and 410). The method 400 determines if there are enough or a sufficientamount of matching similarity elements (step 412). If not enoughmatching similarity elements are found then the method 400 determinesthat no similar data is found in the repository for the input datachunk, and the data of the input chunk is stored in a repository (step414) and then the method 400 ends (step 438). If enough similarityelements are found, then for each similar data interval found in arepository, the method 400 determines the position and size of eachsimilar data interval in the repository (step 416). The method 400locates the digests representing the similar data interval in therepository (step 418). The method 400 loads these digests into a searchdata structure of digests in memory (step 420). The method 400determines if there are any additional similar data intervals (step422). If yes, the method 400 returns to step 416. If no, the method 400considers each digest of the input data chunk (step 424). The method 400determines if the digest value exists in the memory search structure ofdigests (step 426). If yes, the method 400 records the identity betweenthe input data covered by the digest and the repository data having thematching digest value (step 428). If no, the method 400 records that theinput data covered by the digest is not found in the repository (step430). From both steps 428 and 430, the method 400 determines if thereare additional digests of the input data chunk (step 432). If yes, themethod 400 returns to step 424. If no, method 400 removes the similarityelements of the matched data in the repository from the similaritysearch structure (step 434 and step 410). The method 400 adds thesimilarity elements of the input data chunk to the similarity searchstructure (step 436). The method 400 ends (step 438).

FIG. 5 is a flowchart illustrating an exemplary method 500 for efficientcalculation of both similarity search values and boundaries of digestblocks using a single linear calculation of rolling hash values in adata deduplication system in which aspects of the present invention maybe realized. The method 500 begins (step 502). The method 500 partitionsinput data into data chunks (steps 504). The data chunks may be fixedsized data chunks. The method 500 considers each consecutive window ofbytes in a byte offset in the input data (step 506). The method 500determines if there is an additional consecutive window of bytes to beprocessed (step 508). If yes, the method 500 calculates a rolling hashvalue based on the data of the consecutive window of bytes (step 510).The method 500 contributes the rolling hash value to the calculation ofthe similarity values and to the calculation of the digest blockssegmentations (i.e., the digest block boundaries) (step 512). The method500 discards the rolling hash value (step 514), and returns to step 506.If no, the method 500 concludes the calculation of the similarityelements and of the digest blocks segmentation, producing the finalsimilarity elements and digest blocks segmentation of the input data(step 516). The method 500 calculates digest values based on the digestblocks segmentation, wherein each digest block is assigned with acorresponding digest value (step 518). The similarity elements are usedto search for similar data in the repository (step 520). The digestblocks and corresponding digest values are used for matching with digestblocks and corresponding digest values stored in a repository fordetermining data in the repository which is identical to the input data(step 522). The method 500 ends (step 524).

In one embodiment, as described below, the global cache consists of apool of sequential arrays of digest entries, and a hash table. FIG. 6 isa schematic diagram of the cache structure. The arrays are used to loadsequences of repository digests into the cache, where each array beingused contains a specific section of repository digests in a sequentialform. Each digest entry in an array contains the digest value, alongwith the position and size of its associated segment in the data. Thehash table contains entries, which point into the arrays. Each digestbeing stored in the table contributes an entry inside the table, wherethe entry is linked to the entries list of the table bucket where thedigest value is hashed to. Each entry consists of two compact indexes,one pointing to a digests array, and the second pointing to a digestentry position inside the array. The hash table enables to efficientlysearch within the cache's contents.

FIG. 6 is a block diagram illustrating a global digests cache structurewhich aspects of the present invention may be realized. In oneembodiment, as described in FIG. 6, the global cache 600 consists of apool 602 of sequential arrays of digest entries 604 (shown in FIG. 6 as604A-F), and a hash table 610. Within the global digests cache 600 aredigest arrays 604 (shown in FIG. 6 as 604A-F), where each of the digestarrays may contain a sequence of digest entries 606 (shown in FIG. 6 as606A-H). Sequences of repository digests are loaded into the digestarrays 606, where each array being used contains a specific section ofrepository digests in a sequential form. Each digest entry in an arraycontains the digest value, along with the position and size of itsassociated segment in the data. The hash table 610 contains buckets 612(shown in FIG. 6 as 612A-G) where digest values are hashed to. Eachbucket points to a list of entries 608, where each entry points into thedigest arrays 606. Each digest being stored in the hash table 610contributes an entry 608A-D inside the hash table 610, where the entry608A-D is linked to the entries list 608 of the table bucket 612A-Gwhere the digest value is hashed to. Each entry 608A-D consists of twocompact indexes, one pointing to a digests array 606, and the secondpointing to a digest entry position inside the array 606A-H. The hashtable enables to efficiently search within the cache's contents.

In one embodiment, a deduplication process of an input chunk of data(see FIG. 11 below) first applies a similarity search step to find thepositions of the most similar reference data in the repository. Inaddition, the digest segments and respective values of the input chunkare calculated and stored in a memory array in the sequence of theiroccurrence in the input data. The positions of similar data are thenused to lookup the digests of the similar sections of data in therepository, and load these sequences of digests into the global digestscache. Given a position and size of a section of similar data containedin the repository, its associated digests are efficiently located andloaded into an array in the global digests cache, in a form thatcorresponds to their occurrence in the data. Each continuous sequence ofthe digests being loaded into the cache is copied into a separatedigests array of the cache, and the array is labeled with the repositoryposition and size of the reference data interval whose associatedsequence of digests it now contains. If the digests of a given intervalof repository data are already loaded in the global digests cache, atthe time when the deduplication process requests to load these digests,then these digests are not reloaded, as being already available foraccess in the cache. The global digests cache further implements a LeastRecently Used (LRU) policy for reusing arrays of digests. Next, thededuplication process of an input chunk searches for each of the inputdigest values in the global cache, and if matching digests exist in theglobal cache, then the cache provides access to the digests arrayscontaining these matching digests. Searching within the global cache isdone by searching first in the hash table, and then accessing the arraysof digests pointed to from the relevant entries in the hash table. Asboth the input and repository digests are stored in sequential arrays,extension of matching digests sequences in a forward and backwarddirections may be applied. The largest sequence of matched digests isselected, and the identity between the input data and the repositorydata covered by the selected sequence of matched digests is recorded.

An additional important use of the global digests cache is using thecache as a window into the data recently processed by the system to tryand find data matches in cases where the similarity search step can notfind any similar data in the repository. In workloads characterized byhigh change rates and/or high internal reordering, these effects canmodify the similarity elements calculated in the similarity search step,thus causing selection of data whose commonalities with the input dataare limited, or at a worst case causing inability to find similar datain the repository. In such cases, the present includes a step thatsearches for input digests in the global digests cache, even if theprevious step of similarity search did not find similar data, and thusdid not enable to load relevant digests into the cache. In cases of highinternal reordering, multiplexing, or high change rate, affecting theeffectiveness of similarity search, it is considerably probable that theglobal cache will indeed contain recently processed digests which arerelevant for matching with the input digests, and therefore enable tofind additional data matches and improve the deduplication results. If asearch for similar data in the repository does not provide results thenthe present invention matches input and repository digests contained ina global memory cache of digests to find data matches.

Thus, based upon the foregoing, if the step of similarity searchsucceeds in finding similar repository data (as it normally does), whenthe next step of digests matching searches for input digests in theglobal cache and identifies matching digests, it follows a policy ofpreferring matches to repository digests which are contained in the dataintervals that were determined as similar by the previous similaritysearch step. The reason for that is that the similarity search step hasa view of all the data in the repository, and applies logic to selectthe best data in the repository, which is expected to yield good andsufficiently large commonalities with the input data. This policy yieldshigh quality matches in terms of producing longest sequences of matchedinput and repository digests. This is beneficial for improving thededuplication results and for improving the overall storage andprocessing efficiency.

FIG. 7 is a flowchart illustrating an exemplary method 700 for utilizinga global digests cache in a deduplication process in a datadeduplication system in which aspects of the present invention may berealized. The method 700 begins (step 702). The method 700 partitionsthe input data into chunks (e.g., partitions the input data into largefixed size chunks) (step 704), and for an input data chunk calculatesrolling hash values, similarity values (SV), digest segment boundariesand digest values, based on the data of the input data chunk (step 706).The method 700 searches for similarity values of the input data chunk ina similarity index (step 708 and 710). The method 700 determines ifthere are enough and/or a sufficient amount of matching similarityvalues (step 712). If not enough matching similarity values are foundthen the method 700 sequentially considers each digest of the inputchunk (step 724). If enough similarity values are found, then for eachsimilar data interval found in a repository, the method 700 determinesthe position and size of each similar data interval in the repository(step 714). The method 700 determines if a global digests cache (GDC)contains the digests of a specified interval (step 716 and step 718). Ifyes, the method 700 returns to step 714. If no, the method 700 locatesthe digests representing the similar data interval in the repository andloads these digests into the global digests cache, namely into a digestsarray and into a hash table using appropriate sampling (step 720 andstep 718).

The method 700 determines if there are any additional similar dataintervals (step 722). If yes, the method 700 returns to step 714. If no,the method 700 considers each digest of the input chunk (step 724). Themethod 700 determines if the input digest matches any digest in theglobal digests cache (step 726). If no, the method 700 records the inputdata covered by the digest as not found and/or located in the repository(step 730). If the method 700 determines that the input digest doesmatch at least one digest in the global digests cache, the method 700prefers matching repository digests of the data identified as similardata (if exits), extends the sequence of matching digests using thesequential input and cache array, and selects a largest sequence ofmatched digests (step 736). The method 700 records the identify betweenthe input data and repository data covered by the matching sequences ofdigests (step 738). From both steps 738 and 730, the method 700determines if there are additional digests of the input data chunk (step732). If yes, the method 700 returns to step 726. If no, the method 700removes the similarity values of the matched data in the repository fromthe similarity search index (step 734 and step 710). The method 700 ends(step 738).

FIG. 8 is a flowchart illustrating an exemplary alternative method 800for utilizing a global digests cache in deduplication processing in adata deduplication system in which aspects of the present invention maybe realized. The method 800 begins (step 802). The method 800 partitionsthe input data into chunks (step 804). The method 800, calculates foreach data chunk similarity values, digest segment boundaries and digestvalues, based on the data of the input data chunk (step 806). The method800 finds positions of similar data in a repository of data for each ofthe data chunks (step 808). The method 800 locates and loads repositorydigests of the similar repository data into a global digests cache (step810. The method 800 matches input digests of the input data with therepository digests contained in the global digests cache for locatingdata matches (step 812). The method 800 ends (step 814).

In one embodiment, the hash table of the global digests cache containssparse contents using sampling. In one embodiment, when a sequence ofdigests is loaded from the repository into the global digests cache, thefull sequence of digests is loaded into a memory array in the cache,however only a sample of the full sequence of digests is loaded into thecache's hash table. An example for a sampling policy is loading into thehash table a first digest of each fixed size subsequence of digests (thesize of a subsequence can be for example 4 digests). The sparsenessenables to reduce the memory consumption of the hash table, whilemaintaining same deduplication results, or alternatively extend the timewindow reflected by the global cache while using a same amount ofmemory. When a sparse hash table is applied, each and every input digestshould be searched in the hash table during a deduplication process,even digests that are part of an extension of a matched sequence ofdigests. With sampling applied, the deduplication process has to locateall the anchor matching digests and apply extensions, and can not avoidthe search of any of the input digests. Therefore the sparsenessprovides the benefit of saving memory consumption or alternativelyextending the time window reflected by the global cache, in exchange foradditional search operations.

Different workloads streamed into a deduplication system may becharacterized by varying degrees of difficulty to achieve effectivededuplication. Workloads characterized by higher changes rates and/orhigher level of internal reordering, are generally more difficult fordeduplication. Such workloads may benefit from having higher density ofdigests in the hash table of the global digests cache, in order toincrease the probability of finding matching reference data. On theother hand for workloads that allow easier deduplication, less density,i.e. more sparseness, of digests can be maintained in the hash table.Therefore, in one embodiment the level of sampling is tuned for eachdeduplication process of a stream of incoming data in accordance withits deduplication results. As the deduplication results are better, thedigests sparseness in the hash table can be higher, and as thededuplication results are lower, the digests sparseness can be loweruntil sampling is completely disabled. This enables the hash tablecontents to be more effective in facilitating efficient deduplicationfor the different types of workloads.

As mentioned previously, underlying the present invention, as describedin the various embodiments described above, is an observation, which hasbeen proven to be characteristic of backup environments, that when aninterval of repository data is identified as similar to a chunk of inputdata, there is high probability that the data following this interval inthe repository will be referenced shortly after by subsequent inputdata.

Based on this observation, the algorithm predicts which repositorydigests will be needed for subsequent input data, based on the resultsof the similarity search process, and then loads these digests into theglobal cache via a background process. In this way these digests arealready available in the global cache at the time they are needed bydeduplication processing of subsequent chunks of input data. The benefitof this algorithm is performing most of the digests reading operationsin parallel to the deduplication process (instead of in the foreground),thus resulting in increased efficiency and throughput of the overalldeduplication process.

Thus, in one embodiment, within the processing of a given input datachunk there is a point where specific repository intervals of data areidentified as similar to the input chunk. If processing of the inputchunk preceding the current data chunk in the steam of input data,resulted in good deduplication, then the similar repository intervalsidentified for the current input chunk are those following the dataintervals identified as similar to the previous input chunk. If on theother hand, the processing of the input chunk preceding the currentchunk in the steam of input data, resulted in insufficientdeduplication, then similarity search is activated for the current inputchunk, and similar repository intervals are identified via the processof similarity search.

The read ahead mechanism of the present invention, as described ingreater detail in FIG. 9 below, receives as input the positions andsizes of the repository intervals of data which are identified assimilar to a current input data chunk, and then calculates additionalrepository intervals for reading ahead, which are likely to bereferenced by subsequent input data chunks. In one embodiment, thepresent invention defines a constant that determines the size of therepository intervals calculated for read ahead, as a function of theinput similar intervals. The calculation works such that the size ofeach input similar repository interval is multiplied by this constant,yielding the size of its associated read ahead interval. The position ofa read ahead interval is the position immediately following itsassociated input similar interval. This calculation provides a list ofcandidate repository intervals for read ahead.

In one embodiment, the read ahead mechanism has to avoid reading digestsof a same interval of repository data more than once. For this reason,the list of candidate read ahead intervals is processed by the readahead mechanism to determine the read head sub-intervals of thecandidate intervals, which are not in current processing of readingtheir digests in the background, and their digests are not alreadyloaded into the cache of digests. This calculation is done by querying adata structure used by the read ahead mechanism to record thespecifications of the repository intervals currently in a backgroundreading process, and by querying the cache of digests. This calculationproduces a list of sub-intervals appropriate for background reading.These sub-intervals are then packed into tasks, which are delivered fora background processing.

FIG. 9 is a flowchart illustrating an exemplary method 900 forcalculating and dispatching background tasks of digests read-ahead insimilarity based deduplication in a data deduplication system in whichaspects of the present invention may be realized. The method 900 begins(step 902). The method 900 partition input data into chunks and processeach chunk (step 904). The method 900 determines positions and sizes ofsimilar repository intervals (step 906). The method 900 determines ifthere is another similar interval (step 908). If yes, the method 900calculates the positions and size of a candidate read ahead intervalassociated with the similar interval (step 910). In other words, foreach similar interval a candidate read ahead interval is calculated andstep 910 specifies the method for calculating the candidate read aheadinterval. The read ahead interval is termed as “candidate” because itmay be filtered out by later in the method 900. The position of the readahead interval is the position immediately following its associatedinput similar interval, and the size of the read ahead interval is afunction of the size of its associated input similar interval and apredefined constant. From step 910, the method 900 returns to step 908.If there are no other similar intervals (step 908), the method 900determines if there is another candidate read ahead interval (step 912).If yes, the method 900 determines if there are digests associated withthe candidate read ahead interval already loaded fully and/or partiallyin the cache of digests (e.g., a global digests cache) (step 914 andstep 916). If yes the method 900 calculates sub-intervals whose digestsare not loaded in the cache of digests (step 922). The method 900 thenmoves to step 918. If no (from step 914), the method 900 determines ifthe candidate read ahead interval is already in processing, fully and/orpartially, by a background read ahead mechanism (step 918) and uses alist of read ahead intervals currently in background processing (step920). If yes, the method 900 calculates sub-intervals, which are not ina current background read ahead processing, and adds to a list ofsub-intervals for further processing (step 924). From step 924, themethod 900 returns to step 912. If no (from step 918), the method 900adds the sub-intervals to a list of sub-intervals for further processing(step 926), and returns to step 912.

Returning now to step 912, if there is not another candidate read aheadinterval, the method 900 determines if there is another read aheadsub-interval (step 928). If no, the method 900 ends (step 934). If yes,the method 900 creates a read ahead background task for the sub-intervaland adds to the list of task (step 930), using a list of tasks forbackground read ahead (step 932). From step 930, the method 900 returnsto step 928.

A pool of background threads receives and executes the read ahead tasks(See FIG. 10 below). For each task, the digests associated with therepository interval are located, retrieved from the repository andloaded into the global cache of digests. For each task whose processinghas been completed, its associated interval is removed from the list ofread ahead intervals in background processing. The reading and loadingof the digests is done in the background, and since each task isperformed by a different thread—the background reading and loading isdone in parallel.

FIG. 10 is a flowchart illustrating an exemplary method 1000 forbackground processing of digests read ahead tasks. in which aspects ofthe present invention may be realized. The method 1000 begins (step1002). The method 1000 determines if there is an additional task in alist of tasks for background read ahead (step 1004 and step 1006). Ifno, the method 1000 ends (step 1018). If yes, the method 1000 locatesand reads digests of the repository interval specified in the task intoa cache of digests (e.g., a global digests cache) (step 1008). In step1008 digests are read from a repository (step 1010) into a cache ofdigests (step 1012). The method 1000 removes the interval specified inthe task from the list of read ahead intervals in background processing(step 1014 and step 1016).

After a deduplication process identifies similar repository intervals,and applies the read ahead calculations specified above and subsequentlydispatches read ahead tasks (See FIG. 9 above), the process proceedswith the following steps (see FIG. 11 below). The deduplication processchecks the availability of the digests of all the similar intervalsidentified for the current input chunk, in the cache of digests. Some ofthese intervals may be already in the cache, some in read aheadprocessing, and some not in either of these. The process then retrievesthe digests of the sub-intervals, which are not in the cache nor in readahead processing, and loads these digests into the cache of digests.This is done in the foreground, since these digests are requiredimmediately for processing of the current input chunk. After completionof retrieval and loading of these digests, the deduplication processthen waits, if required, for completion of the background read ahead ofdigests of intervals, which were determined to be already in backgroundread ahead processing. Compared to a situation where all the digests ofthe similar repository intervals would have been processed by foregroundretrieval, the process described above is considerably faster, becausein most cases, most of the required digests are already in the cache, ortheir background read ahead started previously and is about to complete(hence a wait, if at all required, is minimal).

FIG. 11 is a flowchart illustrating an exemplary method 1100 for adeduplication process with read-ahead of digests in a data deduplicationsystem in which aspects of the present invention may be realized. Themethod 1100 begins (step 1002). The method 1100 partition input datainto chunks and process each chunk (step 1103). The method 1100determines positions and sizes of similar repository intervals (step1104). The method 1100 performs read ahead calculations and dispatchesbackground tasks, as described above in FIG. 9 (step 1106). The method1100 determines if there is another similar interval (step 1108). Ifyes, the method 1100 determines if the digests associated with thesimilar interval are already loaded fully and/or partially in a cache ofdigests (e.g., a global digests cache) (step 1110), using a cache ofdigests (step 1112). If yes, the method 1100 calculates sub-intervalswhose digests are not loaded in the cache of digests (step 1114). Themethod 1110 then moves to step 1116 from step 1114. If no (from step1110), the method 1100 determines if the similar interval is already inprocessing, fully and/or partially, by a background read ahead mechanism(step 1116) and uses a list of read ahead intervals currently inbackground processing (step 1118). If yes, the method 1100 calculatessub-intervals that are not in current background read ahead processingand adds to a list of sub-intervals for further processing (step 1120).From step 1120, the method 1100 returns to step 1108. If no (from step1116), the method 1100 adds the sub-intervals to a list of sub-intervalsfor further processing (step 1122), and returns to step 1108.

Returning now to step 1108, if there is not another similar interval,the method 1100 determines if there is another similar sub-interval(step 1124). If yes, the method 1100 loads the digests of thesub-interval from the repository into the cache of digests (step 1126and step 1112), and the method 1100 returns to step 1124. If no, themethod 1100 waits, if required, for completion of the background readahead digests of sub-intervals that were determined to be already inbackground read ahead processing (step 1128). The method 1100 ends (step1130).

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that may contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wired, optical fiber cable, RF, etc., or any suitable combination of theforegoing. Computer program code for carrying out operations for aspectsof the present invention may be written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Java, Smalltalk, C++ or the like and conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, may beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that may direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the above figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, may be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

What is claimed is:
 1. A method for read ahead of digests in similaritybased data deduplication using a processor device in a computingenvironment, comprising: partitioning input data into data chunks;finding positions and sizes of similar data intervals in a repository ofdata for each of the data chunks; calculating the positions and thesizes of read ahead intervals; and locating and loading the read aheaddigests of the read ahead intervals into memory in a background readahead process.
 2. The method of claim 1, further including calculatingthe read ahead intervals based on the similar data intervals produced bya similarity search.
 3. The method of claim 1, further includingcalculating the position of a read ahead interval as the positionimmediately following a respective input similar interval of the readahead interval.
 4. The method of claim 1, further including calculatingthe size of a read ahead interval as a function of the size of arespective input similar interval of the read ahead interval and apredefined constant.
 5. The method of claim 1, further includingfiltering a list of candidate read ahead intervals by omittingsub-intervals whose read ahead digests are already available in thememory.
 6. The method of claim 5, further including filtering the listof candidate read ahead intervals by omitting sub-intervals which arealready in the background read ahead process.
 7. The method of claim 1,further including creating a task for each read ahead interval forbackground execution.
 8. The method of claim 1, further includingfiltering a list of similar repository intervals required fordeduplication of an input chunk of data by omitting sub-intervals whoseread ahead digests are already available in memory and sub-intervalswhich are already in background read ahead processing.
 9. The method ofclaim 8, further including loading the read ahead digests of onlyremaining sub-intervals into the memory.
 10. A system for read ahead ofdigests in similarity based data deduplication of a computingenvironment, the system comprising: a data deduplication system; amemory in association with the data duplication system, at least oneprocessor device operable in the computing environment for controllingthe data deduplication system, wherein the at least one processordevice: partitions input data into data chunks, finds positions andsizes of similar data intervals in a repository of data for each of thedata chunks, calculates the positions and the sizes of read aheadintervals, and locates and loads the read ahead digests of the readahead intervals into memory in a background read ahead process.
 11. Thesystem of claim 10, wherein the at least one processor device calculatesthe read ahead intervals based on the similar data intervals produced bya similarity search.
 12. The system of claim 10, wherein the at leastone processor device calculates the position of a read ahead interval asthe position immediately following a respective input similar intervalof the read ahead interval.
 13. The system of claim 10, wherein the atleast one processor device calculates the size of a read ahead intervalas a function of the size of a respective input similar interval of theread ahead interval and a predefined constant.
 14. The system of claim10, wherein the at least one processor device filters a list ofcandidate read ahead intervals by omitting sub-intervals whose readahead digests are already available in the memory.
 15. The system ofclaim 14, wherein the at least one processor device filters the list ofcandidate read ahead intervals by omitting sub-intervals which arealready in the background read ahead process.
 16. The system of claim10, wherein the at least one processor device creates a task for eachread ahead interval for background execution.
 17. The system of claim10, wherein the at least one processor device filters a list of similarrepository intervals required for deduplication of an input chunk ofdata by omitting sub-intervals whose read ahead digests are alreadyavailable in memory and sub-intervals which are already in backgroundread ahead processing.
 18. The system of claim 17, wherein the at leastone processor device loads the read ahead digests of only remainingsub-intervals into the memory.
 19. A computer program product for readahead of digests in similarity based data deduplication using aprocessor device in a computing environment, the computer programproduct comprising a computer-readable storage medium havingcomputer-readable program code portions stored therein, thecomputer-readable program code portions comprising: a first executableportion that partitions input data into data chunks; a second executableportion that finds positions and sizes of similar data intervals in arepository of data for each of the data chunks; a third executableportion that calculates the positions and the sizes of read aheadintervals; and a fourth executable portion that locates and loads theread ahead digests of the read ahead intervals into memory in abackground read ahead process.
 20. The computer program product of claim19, further including a fifth executable portion that calculates theread ahead intervals based on the similar data intervals produced by asimilarity search.
 21. The computer program product of claim 19, furtherincluding a fifth executable portion that calculates the position of aread ahead interval as the position immediately following a respectiveinput similar interval of the read ahead interval.
 22. The computerprogram product of claim 19, further including a fifth executableportion that calculates the size of a read ahead interval as a functionof the size of a respective input similar interval of the read aheadinterval and a predefined constant.
 23. The computer program product ofclaim 19, further including a fifth executable portion that filters alist of candidate read ahead intervals by omitting sub-intervals whoseread ahead digests are already available in the memory.
 24. The computerprogram product of claim 23, further including a sixth executableportion that filters the list of candidate read ahead intervals byomitting sub-intervals which are already in the background read aheadprocess.
 25. The computer program product of claim 19, further includinga fifth executable portion that creates a task for each read aheadinterval for background execution.
 26. The computer program product ofclaim 19, further including a fifth executable portion that filters alist of similar repository intervals required for deduplication of aninput chunk of data by omitting sub-intervals whose read ahead digestsare already available in memory and sub-intervals which are already inbackground read ahead processing.
 27. The computer program product ofclaim 26, further including a sixth executable portion that loads theread ahead digests of only remaining sub-intervals into the memory.